Sender Property (Message Object) 

The Sender property returns the sender of a message as an AddressEntry object. Read-only.

Syntax

Set objAddrEntry = objMessage.Sender

objAddrEntry

Object. The returned AddressEntry object that represents the messaging user that sent the message.

objMessage

Object. The Message object.

 

Data Type

Object

Remarks

The Sender property corresponds to the MAPI property PR_SENDER_ENTRYID.

Example

This example displays the name of the sender of a message:

' from the sample function Message_Sender

    Set objAddrEntry = objOneMsg.Sender

    If objAddrEntry Is Nothing Then

        MsgBox "Could not set the address entry object from the Sender"

        Exit Function

    End If

    MsgBox "Message was sent by " & objAddrEntry.Name

 

See Also

TimeReceived , Property (Message Object)